home *** CD-ROM | disk | FTP | other *** search
/ Sacred & Secular / Sacred and Secular.iso / pc / movies / shared.dir / 05029_Script_movie script < prev    next >
Text File  |  1996-04-03  |  32KB  |  1,072 lines

  1. global firstpan,firstsnd,guidei
  2. global currentcast,firstincr,endincr
  3. global spritevis,popuptoggle
  4. global wherefrom,onPics,visicon,timeicon,globeicon,icon
  5. global soundcastno,picloclist2,comingfrom
  6. global vispiclist,gRow,gCol,gindex,narron,musicon 
  7. global timepiclist1,timepiclist2,timepiclist3,timepiclist4
  8. global guidelist1,guidelist2,guidelist3,guidelist4,guidelist5
  9. global geoorder,visorder,timeorder,sndfilename,sndfileno 
  10. global gskip,frame,frame2
  11. global sndbitelist,soundpathnarr,soundpathbed,soundpathmix,soundpath
  12. global gSndList
  13. global zoomcast,vissndcnt,guidelist,music2on
  14.  
  15. on hilitePeru2Pic 
  16.   --dmd   set the visible of sprite 16 to false
  17.   -- dmd  set the visible of sprite 17 to false
  18.   set onpics = 0
  19.   set vissndcnt = 0
  20.   --dmd if rollover(18) then set the visible of sprite 17 to true
  21.   --dmd  if rollover(19) then set the visible of sprite 16 to true
  22.   
  23.   set the visible of sprite 17 to rollover(19)
  24.   if not rollOver(19) then
  25.     if rollover(6) then moveframe 6,1361,497,201
  26.     else if rollover(20) then moveframe 20,1374,497,201
  27.     else if rollover(11) then moveframe 11,1393,497,201
  28.     else if rollover(7) then moveframe 7,1340,497,201 
  29.     else if rollover(12) then moveframe 12,1337,497,201     
  30.     else if rollover(9) then moveframe 9,1342,497,201      
  31.     else if rollover(21) then moveframe 21,1303,497,201            
  32.     else if rollover(13) then moveframe 13,1385,497,201 
  33.     else if rollover(22) then moveframe 22,1386,497,201
  34.     else if rollover(14) then moveframe 14,1364,497,201
  35.     else if rollover(10) then moveframe 10,1307,497,201 
  36.     else if rollover(8) then moveframe 8,1366,497,201
  37.     else if rollover(15) then moveframe 15,1397,497,201 
  38.     else if rollover(23) then moveframe 23,1370,497,201
  39.     else if rollover(25) then moveallframes
  40.   end if
  41.   
  42.   if not onPics then
  43.     checkghostrollover
  44.     set the locH of sprite 2 to -640 
  45.     set the locH of sprite 3 to -640 
  46.     set the locH of sprite 4 to -640
  47.     set the locH of sprite 5 to -640 
  48.   end if
  49. end hilitePeru2Pic
  50. on hilitePeru1Pic thev
  51.   
  52.   if not rollover(20) then set the visible of sprite 24 to false
  53.   set rolloverv = thev
  54.   set onpics = 0
  55.   
  56.   set the visible of sprite 17 to rollover(19)
  57.   if not rollOver(19) then
  58.     if rollover(6) then moveframe (6,1373,406,44)
  59.     else if rollover(11) then moveframe (11,1358,534,169)
  60.     else if rollover(14) then moveframe (14,1359,534,169)
  61.     else if rollover(10) then moveframe (10,1377,432,100)    
  62.     else if rollover(7) then moveframe (7,1382,397,49)     
  63.     else if rollover(15) then moveframe (15,1390,563,204)         
  64.     else if rollover(12) then moveframe (12,1345,541,173)            
  65.     else if rollover(9) then moveframe (9,1357,541,173)
  66.     else if rollover(13) then moveframe (13,1316,417,73)  
  67.     else if rollover(8) then moveframe (8,1328,428,89) 
  68.     else if rollover(21) then movesevframes (0,rolloverv,21,406,44,[6],2)
  69.     else if rollover(22) then whatcity(1,rolloverV)
  70.     else if rollover(23) then whatcity(2,rolloverV)
  71.     else if rollover(25) then movesevframes (0,rolloverv,25,548,226,[10],2)
  72.     else if rollover(20) then 
  73.       set the regpoint of cast 1335 = point(0,0)
  74.       set cw = the width of cast 1335
  75.       set ch = the height of cast 1335
  76.       set the castnum of sprite 2 to 1335
  77.       set the rect of sprite 2 = rect(0,33,0+cw,33+ch)
  78.       set the locH of sprite 4 to 428
  79.       set the locV of sprite 4 to 89 
  80.       set the locH of sprite 5 to -640 
  81.       set the visible of sprite 24 to true
  82.       set onPics = 1
  83.       
  84.       --move frames according to city rollover
  85.     end if
  86.     
  87.   end if
  88.   
  89.   if not onPics then
  90.     checkghostrollover
  91.     set the locH of sprite 2 to -640 
  92.     set the locH of sprite 4 to -640
  93.     set the locH of sprite 5 to -640 
  94.   end if
  95. end hilitePeru1Pic
  96. on whatcity box,rolloverv
  97.   if box = 1 then
  98.     if rolloverv < 91 then
  99.       movesevframes (box,rolloverv,22,417,73,[14],2)
  100.     else
  101.       if rolloverv < 109 then
  102.         set the visible of sprite 24 to true
  103.         movesevframes (box,rolloverv,22,428,89,[15],2)
  104.       else
  105.         movesevframes (box,rolloverv,22,432,100,[9],2)
  106.       end if
  107.     end if
  108.   end if
  109.   
  110.   if box = 2 then
  111.     if rolloverv < 177 then
  112.       movesevframes (2,rolloverv,23,534,169,[7,8],2)
  113.     else
  114.       if rolloverv < 194 then
  115.         movesevframes (2,rolloverv,23,541,173,[12,13],2)
  116.       else
  117.         movesevframes (2,rolloverv,23,563,204,[11],2)
  118.       end if
  119.     end if
  120.   end if
  121. end whatcity
  122. on hilitePeru3Pic thev
  123.   --  set the visible of sprite 16 to false
  124.   --  set the visible of sprite 17 to false
  125.   set rolloverv = thev
  126.   set onpics = 0
  127.   set the visible of sprite 17 to rollover(19)
  128.   if not rollOver(19) then
  129.     if rollover(12) then moveframe (12,1324,481,190)
  130.     else if rollover(8) then moveframe (8,1362,481,190)
  131.     else if rollover(11) then moveframe (11,1319,548,226)
  132.     else if rollover(6) then moveframe (6,1353,455,143)    
  133.     else if rollover(13) then moveframe (13,1325,500,215)   
  134.     else if rollover(9) then moveframe (9,1327,475,186)       
  135.     else if rollover(7) then moveframe (7,1348,455,143)           
  136.     else if rollover(10) then moveframe (10,1311,482,199) 
  137.     else if rollover(14) then moveframe (14,1344,596,228) 
  138.     else if rollover(15) then movesevframes (0,rolloverv,15,455,143,[9,12],3)
  139.     else if rollover(20) then movesevframes (0,rolloverv,20,397,49,[8],3)
  140.     else if rollover(21) then movesevframes (0,rolloverv,21,481,190,[6,7],3)
  141.     else if rollover(22) then movesevframes (0,rolloverv,22,475,186,[11],3)
  142.     else if rollover(23) then movesevframes (0,rolloverv,23,482,199,[13],3)
  143.     else if rollover(24) then movesevframes (0,rolloverv,24,500,215,[10],3)
  144.     else if rollover(25) then movesevframes (0,rolloverv,25,596,228,[14],3)
  145.   end if
  146.   
  147.   if not onPics then
  148.     checkghostrollover
  149.     set the locH of sprite 2 to -640 
  150.     set the locH of sprite 4 to -640
  151.     set the locH of sprite 5 to -640 
  152.   end if
  153. end hilitePeru3Pic
  154.  
  155.  
  156. on moveframe rollspr,textno,cityH,cityV
  157.   if textno <> 0 then
  158.     if char 1 to 2 of comingfrom = "US" then positiontext (textno,180,8)
  159.     else if comingfrom = "Mexico1" then  positiontext (textno,14,41) 
  160.     else if comingfrom = "Greece1" then positiontext (textno,0,30) 
  161.     else if comingfrom = "Egypt1" then  positiontext (textno,100,12)
  162.     else if comingfrom = "UK1" then positiontext (textno,2,30)
  163.     else positiontext (textno,0,33)
  164.   end if
  165.   
  166.   set the locH of sprite 4 to cityH
  167.   set the locV of sprite 4 to cityV 
  168.   set the locV of sprite 5 = the locV of sprite rollspr
  169.   set the locH of sprite 5 = the locH of sprite rollspr
  170.   set onPics = 1
  171. end moveframe
  172. on positiontext textno,left,top
  173.   --put ">>>positiontext " & textNo
  174.   set the regpoint of cast textno = point(0,0)
  175.   set cw = the width of cast textno
  176.   set ch = the height of cast textno
  177.   set the castnum of sprite 2 to textno
  178.   set the rect of sprite 2 = rect(left,top,left+cw,top+ch)
  179. end positiontext
  180.  
  181. on moveallframes
  182.   set the locH of sprite 4 to 497
  183.   set the locV of sprite 4 to 201
  184.   updatestage
  185.   turnpuppet (true,[6,7,8,9,10,11,12,13,14,15,20,21,22,23])
  186.   setframes ([6,7,8,9,10,11,12,13,14,15,20,21,22,23])
  187.   updatestage
  188.   repeat while rollover(25)
  189.     nothing
  190.   end repeat
  191.   turnpuppet (false,[6,7,8,9,10,11,12,13,14,15,20,21,22,23])
  192. end moveallframes
  193. on setframes sprlist
  194.   repeat with i in sprlist
  195.     set the castnum of sprite i to frame
  196.   end repeat
  197. end setframes
  198.  
  199. on movesevframes box,rolloverv,rollno,cityH,cityV,sprlist,page
  200.   --highlight city
  201.   set the locH of sprite 4 to cityH
  202.   set the locV of sprite 4 to cityV
  203.   UPDATESTAGE
  204.   -- turn puppets on
  205.   if page = 2 then
  206.     set puppetlist = [6,7,8,9,10,11,12,13,14,15,20]
  207.   else
  208.     set puppetlist = [6,7,8,9,10,11,12,13,14,15,20,21,22,23]
  209.   end if
  210.   turnpuppet (false,puppetlist)
  211.   turnpuppet (true,sprlist)
  212.   -- change box to a frame
  213.   setframes sprlist
  214.   repeat while rollover(rollno)
  215.     if box > 0 then
  216.       checkmousepos(box,rolloverv)
  217.     end if
  218.     go the frame
  219.   end repeat
  220.   turnpuppet (false,sprlist)
  221. end movesevframes
  222. on checkmousepos box,rolloverv
  223.   set thev = the mouseV
  224.   if thev <> rolloverv then whatcity(box,thev)
  225. end
  226.  
  227. on turnpuppet  onoff,sprlist
  228.   repeat with i in sprlist
  229.     puppetsprite i,onoff
  230.   end repeat
  231. end turnpuppet
  232.  
  233. on GoCaptionPeru castno
  234.   CURSOR 4
  235.   
  236.   --  puppetsprite 4,false
  237.   --  puppetsprite 5,false
  238.   
  239.   set currentcast = castno
  240.   
  241.   set movieName = "" & (castNo mod 100)
  242.   if length(movieName) = 1 then set movieName = "0" & movieName
  243.   set movieName = movieName & ".DIR"
  244.   
  245.   go to frame (icon-5011) of movie movieName
  246.   
  247.   puppetsprite 7,true
  248.   puppetsprite 4,true
  249.   puppetsprite 2,true
  250.   puppetsprite 3,true
  251.   
  252.   set the regpoint of cast 10 = point(0,0)
  253.   set the rect of sprite 2 = rect(16,23,539,403) 
  254.   set the castnum of sprite 2 to 10
  255.   Set the ink of sprite 2 to 0
  256.   set the locV of sprite 2 to 15
  257.   set the locH of sprite 2 to 24
  258.   
  259.   set the regpoint of cast 1 = point(0,0)
  260.   set the rect of sprite 3 = rect(16,23,539,403) 
  261.   set the castnum of sprite 3 to 1
  262.   Set the ink of sprite 3 to 0
  263.   set the locV of sprite 3 to 15
  264.   set the locH of sprite 3 to 24
  265.   set the forecolor of sprite 3 = 255
  266.   set the backColor of sprite 3 = 0
  267.   
  268.   
  269.   set phototext = 5
  270.   set the regpoint of cast phototext = point(0,0)
  271.   set cw = the width of cast phototext
  272.   set ch = the height of cast phototext
  273.   
  274.   set the foreColor of sprite 7 = 255
  275.   set the backColor of sprite 7 = 0
  276.   
  277.   set the castnum of sprite 7 = phototext
  278.   
  279.   -- dmd   set the rect of sprite 7 = rect(10,400,10+cw,400+ch)
  280.   set the rect of sprite 7 = rect(7,408,7+cw,408+ch)
  281.   
  282.   Set the ink of sprite 7 to 0
  283.   
  284.   --  set the castnum of sprite 3 to icon
  285.   --  set the rect of sprite 3 = rect(579,2,639,294) 
  286.   
  287.   if narron then
  288.     set the visible of sprite 22 to false
  289.   else 
  290.     set the visible of sprite 22 to true
  291.   end if
  292.   if musicon = 0 then 
  293.     set the visible of sprite 27 = 1
  294.   else
  295.     set the visible of sprite 27 = 0
  296.   end if
  297.   --dmd set the visible of sprite 16 to false
  298.   set the visible of sprite 17 to false
  299.   --  go "CaptionPic"
  300.   
  301.   cursor -1
  302.   
  303. end GoCaptionPeru
  304. on GoCaption2
  305.   cursor 4
  306.   puppetsprite 1,false
  307.   puppetsprite 2,true
  308.   puppetsprite 3,true
  309.   puppetsprite 4,true
  310.   puppetsprite 7,true
  311.   
  312.   set the castNum of sprite 2 = 0
  313.   set the castNum of sprite 3 = 0
  314.   set the rect of sprite 2 = rect(23, 15, 539, 402)
  315.   set the rect of sprite 3 = rect(23, 15, 539, 402)
  316.   
  317.   updateStage
  318.   -- rect(left,top,right,bottom)
  319.   
  320.   pauseQTSound
  321.   
  322.   unLoadMem (the castNum of sprite 2)
  323.   
  324.   set the regpoint of cast 1 = point(0,0)
  325.   
  326.   set the rect of sprite 2 = rect(23, 15, 539, 402)
  327.   
  328.   --  set the castnum of sprite 2 to currentcast
  329.   set the castnum of sprite 2 to 10
  330.   Set the ink of sprite 2 to 0
  331.   set the locH of sprite 2 to 24
  332.   set the locV of sprite 2 to 15
  333.   
  334.   
  335.   set the castnum of sprite 3 to 1
  336.   Set the ink of sprite 3 to 0
  337.   set the locH of sprite 3 to 24
  338.   set the locV of sprite 3 to 15
  339.   set the forecolor of sprite 3 = 255
  340.   set the backColor of sprite 3 = 0
  341.   
  342.   set the castnum of sprite 4 to icon
  343.   set the rect of sprite 4 = rect(579,1,639,293) -- rect(579,2,639,294) 
  344.   
  345.   --  set phototext = currentcast + 1100
  346.   set phototext = 5
  347.   set the regpoint of cast phototext = point(0,0)
  348.   set cw = the width of cast phototext
  349.   set ch = the height of cast phototext
  350.   
  351.   set the foreColor of sprite 7 = 255
  352.   set the backColor of sprite 7 = 0
  353.   
  354.   set the castnum of sprite 7 = phototext
  355.   -- dmd  set the rect of sprite 7 = rect(10,400,10+cw,400+ch)
  356.   set the rect of sprite 7 = rect(7,408,7+cw,408+ch)
  357.   Set the ink of sprite 7 to 0
  358.   
  359.   
  360.   --dmd set the visible of sprite 16 to false
  361.   set the visible of sprite 17 to false
  362.   go "CaptionPic"
  363.   cursor -1
  364.   
  365.   if not checksndfile() then unPauseQTSound
  366.   
  367.   
  368. end GoCaption2
  369.  
  370. on checksndfile
  371.   
  372.   if comingfrom = "pictext" then
  373.     set y = sndfileno
  374.   else
  375.     set y = currentcast - 300
  376.   end if
  377.   
  378.   if getgQTNum() <> y then
  379.     stopQTSound
  380.     sound stop 1
  381.     playsndfile
  382.     --put ">>>CHANGE SOUND"
  383.     return 1  
  384.   end if
  385.   
  386.   return 0
  387. end checksndfile
  388.  
  389.  
  390. on playsndfile
  391.   global gMixPath, gNarrPath, gBedPath, gQTCastNum
  392.   
  393.   set y = "0" & (currentcast - 300)
  394.   set l = length(y)
  395.   set y = char l-1 to l of y  
  396.   sound stop 1
  397.   set playsound = 1
  398.   
  399.   if musicon and narron then
  400.     set sndfilename = gMixPath & "mix"&y&".mov"
  401.   else 
  402.     if musicon then
  403.       set sndfilename = gBedPath & "bed"&y&".mov"
  404.     else
  405.       if narron then
  406.         set sndfilename = gNarrPath & "narr"&y&".mov"
  407.       else
  408.         set playsound = 0
  409.       end if
  410.     end if
  411.   end if
  412.   
  413.   --put ">>> movie filename" && sndfilename
  414.   
  415.   stopQTSound
  416.   
  417.   if playsound then
  418.     playQTSound sndFileName
  419.   else
  420.     set the fileName of cast gQTCastNum = "TEMPLATE.MOV"
  421.   end if
  422.   
  423.   
  424.   --  if playsound then sound playfile 1,sndfilename
  425. end playsndfile
  426.  
  427. on GoFullPic
  428.   CURSOR 4
  429.   --set x = currentcast
  430.   
  431.   -- dmd don't use names if not necessary... too slow 
  432.   --set CurrPicName = the name of cast x
  433.   
  434.   --puppetsprite 1,true
  435.   puppetsprite 2,1
  436.   puppetsprite 3,1
  437.   puppetSprite 4,1
  438.   
  439.   
  440.   set the locH of sprite 7 to -640
  441.   
  442.   set the locH of sprite 4 to -640
  443.   puppetsprite 4,false
  444.   
  445.   --   set x = currentcast + 100
  446.   --  set the castnum of sprite 2 to x
  447.   
  448.   global gTimerCast
  449.   set gTimerCast = 0
  450.   
  451.   go "fullPic"
  452.   set the regpoint of cast 10 = point(0,0)
  453.   set the rect of sprite 2 = rect(0,0,640,480) 
  454.   set the locH of sprite 2 to 0
  455.   set the locV of sprite 2 to 0
  456.   set the castnum of sprite 2 to 10 
  457.   
  458.   set the regpoint of cast 2 = point(0,0)
  459.   set the rect of sprite 3 = rect(0,0,640,480) 
  460.   set the locH of sprite 3 to 0
  461.   set the locV of sprite 3 to 0
  462.   set the castnum of sprite 3 to 2  
  463.   cursor -1  
  464. end GoFullPic
  465.  
  466.  
  467. -- dmd replacement
  468. on simulaterollover2
  469.   global gVisIndex, gSndBitePath
  470.   cursor -1
  471.   
  472.   if gVisIndex = 0 then   set the locV of sprite 2 = -5000
  473.   checkghost3
  474.   
  475.   --
  476.   --
  477.   -- Set visNum to 1 or 2
  478.   --
  479.   set visNum = 1 + (marker(0) <> label("Visual1"))
  480.   
  481.   set col = 0
  482.   repeat with i = 8 to 16
  483.     if rollOver(i) then  
  484.       set col = i - 7 
  485.       exit repeat 
  486.     end if  
  487.   end repeat
  488.   
  489.   if col = 0 then 
  490.     set gVisIndex = 0
  491.     exit
  492.   end if
  493.   
  494.   set v = the mouseV
  495.   
  496.   set yellowBoxX = the left of sprite (i)
  497.   
  498.   --
  499.   --
  500.   -- Col 3 of vis index 2 is special (see graphic)
  501.   --
  502.   if visNum = 2 and col = 3 then
  503.     set h = the mouseH
  504.     if v < 52 then     
  505.       set gVisIndex = 0
  506.       exit
  507.     end if
  508.     
  509.     if v > 107 then
  510.       
  511.       if h < 169 then 
  512.         set gVisIndex = 0
  513.         exit
  514.       end if
  515.       set yellowBoxX = 168
  516.     else
  517.       if h > 212 then     
  518.         set gVisIndex = 0
  519.         exit
  520.       end if
  521.       set v = v - 11
  522.       set yellowBoxY = 51
  523.     end if
  524.   end if
  525.   
  526.   set row = -1
  527.   
  528.   set r = v - the top of sprite (col+7)
  529.   set n = 55
  530.   repeat with i = 0 to 5
  531.     if r < n then  
  532.       set row = i
  533.       exit repeat
  534.     end if
  535.     if r < n + 9 then exit repeat  
  536.     set n = n + 9 + 55  
  537.   end repeat
  538.   
  539.   if row = -1 then     
  540.     set gVisIndex = 0
  541.     exit
  542.   end if
  543.   
  544.   if yellowBoxY = 0 then ¨
  545. set yellowBoxY = n - 55 + the top of sprite (col+7)
  546.   
  547.   
  548.   -- put ">>> row = " & row && " col = " & col 
  549.   
  550.   
  551.   if visNum = 1 then 
  552.     set sndincr = 0 
  553.   else
  554.     set sndincr = 54
  555.   end if
  556.   
  557.   set i = (row * 9) + col + sndincr
  558.   if i = gVisIndex then exit
  559.   
  560.   set gVisIndex = i
  561.   
  562.   set incr = getat(sndbitelist,gVisIndex)
  563.   if incr = 0 then exit
  564.   
  565.   set the locV of sprite 2 = yellowBoxY
  566.   set the locH of sprite 2 = yellowBoxX
  567.   
  568.   set gRow = row + 1 + 6*(visNum-1) -- add 6 rows for second screen
  569.   set gCol = col
  570.   
  571.   if not music2on then exit
  572.   
  573.   set soundFileName = gSndBitePath & getAt(gSndList,incr-1198)
  574.   
  575.   if soundbusy(1) then sound stop 1
  576.   
  577.   global gVolume
  578.   
  579.   sound playFile 1,soundFileName
  580.   set the volume of sound 1 = gVolume *0.66
  581.   
  582. end simulaterollover2
  583.  
  584. --on simulaterollover 
  585. --  set getH = the mouseH
  586. --  if comingfrom = "visual1" then
  587. --    set picloclist = [76,141,206,271,336,401,466,531,596]
  588. --  else
  589. --    set picloclist =  [94,159,224,289,354,419,484,549,614]
  590. --  end if
  591. --  if rollover(3) then findpic(1,getH,picloclist)
  592. --  if rollover(4) then findpic(2,getH,picloclist) 
  593. --  if rollover(5) then findpic(3,getH,picloclist) 
  594. --  if rollover(6) then findpic(4,getH,picloclist) 
  595. --  if rollover(8) then findpic(5,getH,picloclist)
  596. --  if rollover(9) then findpic(6,getH,picloclist)
  597. --  checkghost3
  598. --end simulaterollover
  599. --
  600. --on findpic rowno,getH,picloclist
  601. --  repeat with x = 1 to 9
  602. --    set rightend = getat(picloclist,x)
  603. --    set leftend = rightend - 55
  604. --    if getH < rightend then
  605. --      checkbox(rowno,x,leftend)
  606. --      set gRow  = rowno
  607. --      set gIndex = x
  608. --      set x = 9
  609. --    end if
  610. --  end repeat
  611. --  go the frame
  612. --end findpic
  613. --
  614. --on checkbox rowno,x,leftend
  615. --  --check for non-pic squares
  616. --  
  617. --  set VISMAX = 1
  618. --  
  619. --  set gskip = 0
  620. --  if comingfrom = "visual1" then
  621. --    checkbox2 (rowno,x,[1:1,2:1,5:6,6:6])
  622. --  else
  623. --    checkbox2 (rowno,x,[1:6,2:3,2:6,3:3])
  624. --  end if
  625. --  if not gskip then
  626. --    -- position box
  627. --    set the locH of sprite 2 to leftend
  628. --    if rowno = 5 or rowno = 6 then
  629. --      set the locV of sprite 2 = the locV of sprite (rowno+3)
  630. --    else
  631. --      set the locV of sprite 2 = the locV of sprite (rowno+2)
  632. --    end if
  633. --    -- sound in memory
  634. --    if comingfrom = "visual1" then 
  635. --      set sndincr = 0 
  636. --    else
  637. --      set sndincr = 54
  638. --    end if
  639. --    set i = ((rowno - 1) * 9) + x + sndincr
  640. --    set incr = getat(sndbitelist,i)
  641. --    if incr <> 0 then
  642. --      set soundFileName = getAt(gSndList,incr-1198)
  643. --      
  644. --      --set sndname = the name of cast incr
  645. --      if music2on then
  646. --        if not soundbusy(1) and vissndcnt < VISMAX then
  647. --          --puppetsound sndname
  648. --          sound playFile 1,soundFileName
  649. --          set vissndcnt = vissndcnt + 1
  650. --          set soundcastno = incr
  651. --        else
  652. --          if incr <> soundcastno then
  653. --            sound stop 1
  654. --            --puppetsound sndname
  655. --            sound playFile 1,soundFileName
  656. --            set soundcastno = incr
  657. --            set vissndcnt = 1
  658. --          end if
  659. --        end if
  660. --        updatestage
  661. --      end if
  662. --    end if
  663. --  end if
  664. --end checkbox
  665. --
  666. --on checkbox2 rowno,x,blankboxlist
  667. --  repeat with i = 1 to 4
  668. --    set blankrow = getpropat(blankboxlist,i)
  669. --    set blankindex = getat(blankboxlist,i)
  670. --    if rowno = blankrow and x=blankindex then
  671. --      set gskip = 1
  672. --      set i = 4
  673. --    end if
  674. --  end repeat
  675. --end checkbox2
  676.  
  677. on getvispic vispic2
  678.   --unload
  679.   unloadmem 
  680.   --  puppetsound 0
  681.   --  puppetsprite 1,false
  682.   --  repeat with i = 3 to 5
  683.   --    puppetsprite i,false
  684.   --  end repeat
  685.   -- dmd  if vispic2 then set gRow =  gRow + 6
  686.   -- dmd  set castno = getat(getat(vispiclist,gRow),gIndex)
  687.   if gRow = 0 or gCol = 0 then exit
  688.   
  689.   set castno = getat(getat(vispiclist,gRow),gCol)
  690.   if castno <> 000 then
  691.     --dmd set the regpoint of cast castno = point(0,0)
  692.     
  693.     set the ink of sprite 2 to 0
  694.     
  695.     --dmd set the rect of sprite 2 = rect(16,23,539,403)
  696.     
  697.     set the visible of sprite 27 to false
  698.     GoCaptionPeru castno
  699.   end if
  700. end  getvispic
  701.  
  702. on searchforPic PicLoc,theH,theV,LH,timepiclist
  703.   global gTimeIndex, gTimeLinePos
  704.   
  705.   set gTimeLinePos = the locH of sprite 2
  706.   
  707.   --put ">>>searchForPic: " & picLoc && theH && theV && LH 
  708.   
  709.   set gotpic = 0
  710.   set items = count(timepiclist)
  711.   set PicLOC = PicLOC + 3 -- dmd was -80 now +3
  712.   repeat with x = 1 to items
  713.     set leftlimit = getpropat(timepiclist,x)
  714.     set rightlimit = leftlimit + 60
  715.     if PicLOC > leftlimit and PicLOC < rightlimit then
  716.       set gotpic = 1
  717.       set castno = getat(timepiclist,x)
  718.       updatestage
  719.       set indx = x
  720.       set x = items
  721.     end if
  722.   end repeat
  723.   if gotpic then
  724.     puppetsprite 5,false
  725.     puppetsprite 6,false
  726.     set x = the castnum of sprite 2
  727.     unloadmem x
  728.     --
  729.     --
  730.     -- DMD: Check for 303 or 368, both are modern and ancient, so appear
  731.     -- twice on the timeline
  732.     --
  733.     if leftLimit > 4000 and (castNo = 303 or castNo = 368) then
  734.       if castNo = 303 then
  735.         set gTimeIndex = 87
  736.       else 
  737.         set gTimeIndex = 78
  738.       end if
  739.     else  
  740.       set gTimeIndex = getPos(timeOrder, castNo)
  741.     end if
  742.     
  743.     --dmd set the regpoint of cast castno = point(0,0)
  744.     --dmd set the rect of sprite 2 = rect(16,23,539,403)
  745.     GoCaptionPeru castno
  746.   else
  747.     set the locH of sprite 5 = -640
  748.   end if
  749. end searchforPic
  750.  
  751. on simulatetimeroll PLOC,LH
  752.   
  753.   --
  754.   --
  755.   -- Note that the use of "gotit" is wrong... it SHOULD be set
  756.   -- as the result from the call to "timeRoll", which in fact
  757.   -- really knows whether a picture was rolled-over.  Left
  758.   -- in original form as an exhibit of what not to do... simple
  759.   -- code review techniques would find such a problem -- DMD.
  760.   --
  761.   
  762.   --put ">>>simulatetimeroll: " & PLOC && LH 
  763.   
  764.   set gotit = 0
  765.   if rollover(8) then 
  766.     set MV = the locV of sprite 8
  767.     timeroll PLOC,MV,LH,timepiclist1
  768.     set gotit = 1
  769.   else
  770.     if rollover(9) then
  771.       set MV = the locV of sprite 9
  772.       timeroll PLOC,MV,LH,timepiclist2
  773.       set gotit = 1
  774.     else
  775.       if rollover(10) then 
  776.         set MV = the locV of sprite 10
  777.         timeroll PLOC,MV,LH,timepiclist3
  778.         set gotit = 1
  779.       else
  780.         if rollover(11) then 
  781.           set MV = the locV of sprite 11
  782.           timeroll PLOC,MV,LH,timepiclist4
  783.           set gotit = 1
  784.         end if
  785.       end if
  786.     end if
  787.   end if
  788.   if not gotit then
  789.     set the locH of sprite 5 = -640
  790.     set the locH of sprite 6 = -640
  791.   end if
  792. end simulateroll
  793.  
  794. on timeroll PicLoc,MV,LH,timepiclist
  795.   set items = count(timepiclist)
  796.   set PicLOC = PicLOC + 3 -- dmd was -80 now +3
  797.   repeat with x = 1 to items
  798.     set leftlimit = getpropat(timepiclist,x)
  799.     set rightlimit = leftlimit + 60
  800.     if PicLOC > leftlimit and PicLOC < rightlimit then
  801.       set leftbox = leftlimit - (-LH)
  802.       set the locH of sprite 5 = leftbox - 2
  803.       set the locV of sprite 5 = MV - 2
  804.       set castno = getat(timepiclist,x)
  805.       set timetitle = castno + 1200
  806.       
  807.       --put ">>> timeTitle" && timeTitle
  808.       
  809.       set the regPoint of cast timetitle = point(0,0)
  810.       set the castnum of sprite 6 = timetitle
  811.       set the locH of sprite 6 = 3
  812.       set the locV of sprite 6 = 61
  813.       updatestage
  814.       set indx = x
  815.       set x = items
  816.     else
  817.       --
  818.       --
  819.       -- Poor coding by first programmers... see code in calling routine, 
  820.       -- especially the variable "gotit".  I left this to show what I had
  821.       -- to deal with in making this program REALLY work. The true costs
  822.       -- were high, due to untested code or code written by more than one
  823.       -- author (and little communication between them).
  824.       --
  825.       set the locH of sprite 6 to -640
  826.       set the locH of sprite 5 to -640 -- added by DMD 
  827.     end if
  828.   end repeat
  829. end timeroll   
  830.  
  831.  
  832.  
  833. on guidePics nextMovie
  834.   global gGuidedTourInProgress
  835.   
  836.   set gGuidedTourInProgress = 1
  837.   
  838.   --  set x = count(guidelist) + 1
  839.   set x = count(guidelist) 
  840.   
  841.   
  842.   set newMovie = 0
  843.   
  844.   if not voidP(nextMovie) then
  845.     set newMovie = 1
  846.     set guidei = guidei + nextMovie
  847.     if guidei = 0 then 
  848.       set guidei = x+1 -- if movie 0, end tour
  849.     end if
  850.   else if guidei = 1 then 
  851.     set newMovie = 1
  852.   else if the movieTime of sprite 48 >= the stopTime of sprite 48 then set newMovie = 1
  853.   
  854.   if newMovie then
  855.     if guidei <= x then  
  856.       guidepics2  guidei
  857.       set guidei = guidei + 1
  858.     else  
  859.       stopQTSound
  860.       sound stop 1
  861.       puppetsprite 1,false
  862.       --      set x = currentcast + 100  
  863.       set x = 2  
  864.       unloadmem x
  865.       starttimer
  866.       set gGuidedTourInProgress = 0
  867.       
  868.       go to frame "guide"   of movie "BRIDGES" 
  869.     end if
  870.   end if
  871.   
  872. end guidePics
  873.  
  874. on checkmousedown
  875.   if the mousedown  then
  876.     if the doubleclick then
  877.       dontpassevent
  878.       return 0
  879.     else
  880.       return 1
  881.     end if
  882.   end if
  883. end checkmousedown
  884.  
  885. on guidePics2 i
  886.   global gMixPath 
  887.   
  888.   --  set x = the name of cast (currentcast + 100)
  889.   set x = the name of cast (2)
  890.   unloadmem (the castNum of sprite 1)
  891.   set currentcast = getat(guidelist,i)
  892.   --set y = currentcast + 100
  893.   
  894.   set y = "0" & (currentcast - 300)
  895.   set l = length(y)
  896.   set y = char l-1 to l of y  
  897.   
  898.   go to frame "FullPic" of movie (y & ".DIR")
  899.   
  900.   puppetSprite 3,1
  901.   --set the regpoint of cast y = point(0,0)
  902.   set the castnum of sprite 3 to 2
  903.   set the locV of sprite 3 = 0
  904.   set the locH of sprite 3 = 0
  905.   
  906.   puppetSprite 4,1
  907.   puppetSprite 5,1
  908.   puppetsprite 7,1
  909.   set the locH of sprite 7 = -640
  910.   
  911.   
  912.   set the castNum of sprite 5 = 5035 -- pink arrow
  913.   set the locV of sprite 5 = 467
  914.   set the locH of sprite 5 = 630
  915.   set the type of sprite 5 = 1
  916.   set the ink of sprite 5 = 8
  917.   set the foreColor of sprite 5 = 255
  918.   
  919.   set the castNum of sprite 4 = 5034 -- pink arrow
  920.   set the locV of sprite 4 = 467
  921.   set the locH of sprite 4 = 10
  922.   set the type of sprite 4 = 1
  923.   set the ink of sprite 4 = 8
  924.   set the foreColor of sprite 4 = 255
  925.   
  926.   --dmd set sndfilename = soundpathmix&"mix"&y&".aif"
  927.   --sound playfile 1,sndfilename
  928.   set sndfilename = gMixPath & "mix"&y&".mov"
  929.   stopQTSound
  930.   
  931.   playQTSound sndFileName
  932.   
  933.   updatestage
  934. end guidePics2
  935.  
  936.  
  937. on hiliteUS1Pic  
  938.   set onpics = 0
  939.   set chan24 = 0
  940.   
  941.   set the visible of sprite 17 to rollover(19)
  942.   if not rollOver(19) then
  943.     if rollover(6) then moveframe (6,1338,516,246)
  944.     else if rollover(12) then moveframe (12,1394,534,86)
  945.     else if rollover(7) then moveframe (7,1392,516,165)
  946.     else if rollover(10) then moveframe (10,1349,569,106)    
  947.     else if rollover(8) then moveframe (8,1383,569,106)     
  948.     else if rollover(11) then moveframe (11,1351,534,86)         
  949.     else if rollover(9) then moveframe (9,1326,500,181)            
  950.     else if rollover(14) then movesevframes (0,0,14,516,246,[6],2)
  951.     else if rollover(15) then movesevframes (0,0,15,534,86,[11,12],2)
  952.     else if rollover(20) then movesevframes (0,0,20,516,165,[7],2)
  953.     else if rollover(21) then movesevframes (0,0,21,569,106,[8,10],2)
  954.     else if rollover(22) then movesevframes (0,0,22,500,181,[9],2)
  955.     else if rollover(13) or rollover(23) then 
  956.       if rollOver(13) then positiontext (1360,180,8)
  957.       
  958.       set the locH of sprite 4 to 501
  959.       set the locV of sprite 4 to 121 
  960.       set the locH of sprite 5 to -640 
  961.       set onPics = 1  
  962.       set chan24 = 1
  963.     end if
  964.   end if
  965.   
  966.   set the visible of sprite 24 = chan24
  967.   
  968.   if not onPics then
  969.     checkghostrollover
  970.     set the locH of sprite 2 to -640 
  971.     set the locH of sprite 4 to -640
  972.     set the locH of sprite 5 to -640 
  973.   end if
  974. end hiliteUS1Pic 
  975.  
  976. on hiliteUS3Pic 
  977.   -- set the visible of sprite 24 to false
  978.   --  set the visible of sprite 16 to false
  979.   --  set the visible of sprite 17 to false
  980.   set onpics = 0
  981.   set the visible of sprite 17 to rollover(19)
  982.   
  983.   if not rollOver(19) then
  984.     if rollover(7) then moveframe (7,1309,255,179)
  985.     else if rollover(10) then moveframe (10,1310,255,179)
  986.     else if rollover(11) then moveframe (11,1398,227,161)
  987.     else if rollover(12) then moveframe (12,1322,225,137)    
  988.     else if rollover(8) then moveframe (8,1378,237,154)     
  989.     else if rollover(9) then moveframe (9,1339,252,155)         
  990.     else if rollover(6) then moveframe (6,1355,257,152) 
  991.     else if rollover(13) then moveframe (13,1336,226,49) 
  992.     else if rollover(14) then movesevframes (0,0,14,255,179,[7,10],2)
  993.     else if rollover(15) then movesevframes (0,0,15,227,161,[11],2)
  994.     else if rollover(20) then movesevframes (0,0,20,225,137,[12],2)
  995.     else if rollover(21) then movesevframes (0,0,21,237,154,[8],2)
  996.     else if rollover(22) then movesevframes (0,0,22,252,155,[9],2)
  997.     else if rollover(23) then movesevframes (0,0,23,257,152,[6],2)
  998.     else if rollover(25) then movesevframes (0,0,25,226,49,[13],2)
  999.     
  1000.   end if
  1001.   
  1002.   if not onPics then
  1003.     checkghostrollover
  1004.     set the locH of sprite 2 to -640 
  1005.     set the locH of sprite 4 to -640
  1006.     set the locH of sprite 5 to -640 
  1007.   end if
  1008. end hiliteUS3Pic
  1009.  
  1010. on hiliteUS4Pic
  1011.   -- set the visible of sprite 24 to false
  1012.   --  set the visible of sprite 16 to false
  1013.   --  set the visible of sprite 17 to false
  1014.   set onpics = 0
  1015.   set the visible of sprite 17 to rollover(19)
  1016.   
  1017.   if not rollOver(19) then
  1018.     if rollover(6) then moveframe (6,1399,80,87)
  1019.     else if rollover(7) then moveframe (7,1306,84,80)
  1020.     else if rollover(8) then moveframe (8,1334,119,204)
  1021.     else if rollover(9) then moveframe (9,1341,78,96)    
  1022.     else if rollover(10) then moveframe (10,1332,68,85)    
  1023.     else if rollover(11) then moveframe (11,1313,119,204)         
  1024.     else if rollover(12) then moveframe (12,1350,128,203)  
  1025.     else if rollover(21) then movesevframes (0,0,21,80,87,[6],2)
  1026.     else if rollover(15) then movesevframes (0,0,15,84,80,[7],2)
  1027.     else if rollover(20) then movesevframes (0,0,20,119,204,[8,11],2)
  1028.     else if rollover(14) then movesevframes (0,0,14,78,96,[9],2)
  1029.     else if rollover(22) then movesevframes (0,0,22,68,85,[10],2)
  1030.     else if rollover(23) then movesevframes (0,0,23,128,203,[12],2)
  1031.   end if
  1032.   if not onPics then
  1033.     checkghostrollover
  1034.     set the locH of sprite 2 to -640 
  1035.     set the locH of sprite 4 to -640
  1036.     set the locH of sprite 5 to -640 
  1037.   end if
  1038. end hiliteUS4Pic 
  1039. on hiliteUS2Pic 
  1040.   -- set the visible of sprite 24 to false
  1041.   --  set the visible of sprite 16 to false
  1042.   --  set the visible of sprite 17 to false
  1043.   set onpics = 0
  1044.   set the visible of sprite 17 to rollover(19)
  1045.   
  1046.   if not rollOver(19) then
  1047.     if rollover(12) then moveframe 12,1372,305,158
  1048.     else if rollover(13) then moveframe 13,1356,291,155
  1049.     else if rollover(11) then moveframe 11,1331,366,179
  1050.     else if rollover(8) then moveframe 8,1330,372,177 
  1051.     else if rollover(9) then moveframe 9,1304,430,92      
  1052.     else if rollover(10) then moveframe 10,1323,407,210   
  1053.     else if rollover(7) then moveframe 7,1371, 399,166            
  1054.     else if rollover(6) then moveframe 6,1380,499,126
  1055.     else if rollover(14) then moveframe 12,0,305,158
  1056.     else if rollover(15) then moveframe 13,0,291,155
  1057.     else if rollover(20) then moveframe 11,0,366,179
  1058.     else if rollover(21) then moveframe 6,0,499,126
  1059.     else if rollover(22) then moveframe 8,0,372,177 
  1060.     else if rollover(23) then moveframe 9,0,430,92
  1061.     else if rollover(25) then moveframe 10,0,407,210   
  1062.     else if rollover(27) then moveframe 7,0,399,166   
  1063.   end if
  1064.   
  1065.   if not onPics then
  1066.     checkghostrollover
  1067.     set the locH of sprite 2 to -640 
  1068.     set the locH of sprite 4 to -640
  1069.     set the locH of sprite 5 to -640 
  1070.   end if
  1071. end hiliteUS2Pic
  1072.